package sr.myserver.vo.common;

import io.swagger.annotations.ApiModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;


@Data
@ApiModel(value = "分页查询结果返回", description = "分页查询结果返回")
public class PageResponse<T> extends PageInfo {
    @Schema(description = "总条数")
    private long total;
    @Schema(description = "返回数据")
    private List<T> data;

    public PageResponse() {
    }

    public PageResponse(long current, long size, long total, List<T> data) {
        super.setCurrent(current);
        super.setSize(size);
        this.total = total;
        this.data = data;
    }
}
